' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.07.14.16.44]) on 2024.07.24 at 02:40 (Coordinated Universal Time)
' This program by Charlie Veniot is a port and mod of the Small Visual Basic program
' by "sVB" shared on Facebook (https://www.facebook.com/share/p/XjtrorRnUsUcuCZf/)
' -−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-
' 🟠 Declarations
DECLARE SUB MyDraw( ox, oy )
'foreground RGB colours and adustment increments for red and green
r% = &hFF : g% = &hD7 : b% = &h00
ra% = -2 : ga% = +1
' -−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-
' 🟠 Main Program
SCREEN _NEWIMAGE( 990, 700, 27 )
COLOR ,&h002211
CLS
DrawIterationStart:
COLOR _RGB( r%, g%, b%)
CALL MyDraw( 400, 0 )
CALL MyDraw( 700, 100 )
CALL MyDraw( 240, 230 )
'Adjust Red
IF ( SGN( ra% ) = -1 AND r% + ra% < 0 ) _
OR ( SGN( ra% ) = 1 AND r% + ra% > 255 ) THEN ra% = - ra%
r% = r% + ra%
'Adjust Green
IF ( SGN( ga% ) = -1 AND g% + ga% < 0 ) _
OR ( SGN( ga% ) = 1 AND g% + ga% > 255 ) THEN ga% = - ga%
g% = g% + ga%
GOTO DrawIterationStart:
END
' -−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-−-
' 🟠 Sub Definition
SUB MyDraw( ox, oy )
oy = oy + 180
FOR r1 = 3 TO 50 STEP 3
FOR x = -180 TO 180
y = r1 * SIN( _D2R( x ) )
PSET( ox + x, oy - y )
PSET( ox + x, oy + y )
PSET( ox - y, oy + x )
PSET( ox + y, oy + x )
'' IF ABS(x) MOD 45 = 0 THEN SLEEP 0.001
NEXT
NEXT
SLEEP 0.01
END SUB